//
// option_2.cpp for 202loi in /home/morel_t//Rendu/maths/202loi
// 
// Made by thomas morel
// Login   <morel_t@epitech.net>
// 
// Started on  Fri Mar  9 12:09:14 2012 thomas morel
// Last update Fri Mar  9 15:56:22 2012 florian jousseau
//

#include <string>
#include <iostream>
#include "202loi.h"
#include "Table.hh"

static void	header(std::string **tab)
{
  tab[0][1] = "X";
  tab[0][2] = "Y";
  tab[1][0] = "E";
  tab[2][0] = "Var";
}

void		option_2(t_tab *tab)
{
  tab->tab2 = new Table(3, 3);

  header(tab->tab2->getSTab());
  tab->tab2->getSTab()[1][1] = toString(esperance_x(tab->tab1->getSTab()));
  tab->tab2->getSTab()[1][2] = toString(esperance_y(tab->tab1->getSTab()));
  tab->tab2->getSTab()[2][1] = toString(variance_x(tab->tab1->getSTab()));
  tab->tab2->getSTab()[2][2] = toString(variance_y(tab->tab1->getSTab()));
  //tab->tab2->printTab();
}
